using System;
using System.Collections.Generic;

namespace Chat.Backend.Models
{
    #region 联系人相关模型

    /// <summary>
    /// 联系人信息
    /// </summary>
    public class ContactInfo
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { get; set; }
        
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string Nickname { get; set; }
        
        /// <summary>
        /// 联系人备注
        /// </summary>
        public string Remark { get; set; }
        
        /// <summary>
        /// 头像URL
        /// </summary>
        public string AvatarUrl { get; set; }
        
        /// <summary>
        /// 电话号码
        /// </summary>
        public string PhoneNumber { get; set; }
        
        /// <summary>
        /// 是否在线
        /// </summary>
        public bool IsOnline { get; set; }
        
        /// <summary>
        /// 关系类型
        /// </summary>
        public ContactRelation Relation { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }

    /// <summary>
    /// 联系人备注
    /// </summary>
    public class ContactRemark
    {
                /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { get; set; }
        
        /// <summary>
        /// 联系人ID
        /// </summary>
        public string ContactId { get; set; }
        
        /// <summary>
        /// 备注名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }

    /// <summary>
    /// 联系人关系类型
    /// </summary>
    public enum ContactRelation
    {
        /// <summary>
        /// 好友
        /// </summary>
        Friend,
        
        /// <summary>
        /// 黑名单
        /// </summary>
        Blocked,
        
        /// <summary>
        /// 关注
        /// </summary>
        Following,
        
        /// <summary>
        /// 陌生人
        /// </summary>
        Stranger
    }

    /// <summary>
    /// 好友请求
    /// </summary>
    public class FriendRequest
    {
        /// <summary>
        /// 请求ID
        /// </summary>
        public string Id { get; set; }
        
        /// <summary>
        /// 发送者ID
        /// </summary>
        public string SenderId { get; set; }
        
        /// <summary>
        /// 发送者昵称
        /// </summary>
        public string SenderNickname { get; set; }
        
        /// <summary>
        /// 接收者ID
        /// </summary>
        public string RecipientId { get; set; }
        
        /// <summary>
        /// 请求消息
        /// </summary>
        public string Message { get; set; }
        
        /// <summary>
        /// 备注名称
        /// </summary>
        public string Remark { get; set; }
        
        /// <summary>
        /// 请求状态
        /// </summary>
        public FriendRequestStatus Status { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }

    /// <summary>
    /// 好友请求状态
    /// </summary>
    public enum FriendRequestStatus
    {
        /// <summary>
        /// 待处理
        /// </summary>
        Pending,
        
        /// <summary>
        /// 已接受
        /// </summary>
        Accepted,
        
        /// <summary>
        /// 已拒绝
        /// </summary>
        Rejected,
        
        /// <summary>
        /// 已过期
        /// </summary>
        Expired
    }

    /// <summary>
    /// 好友请求方向
    /// </summary>
    public enum FriendRequestDirection
    {
        /// <summary>
        /// 接收的请求
        /// </summary>
        Received,
        
        /// <summary>
        /// 发送的请求
        /// </summary>
        Sent
    }

    /// <summary>
    /// 联系人分组
    /// </summary>
    public class ContactGroup
    {
        /// <summary>
        /// 分组ID
        /// </summary>
        public string Id { get; set; }
        
        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { get; set; }
        
        /// <summary>
        /// 分组名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }

    /// <summary>
    /// 联系人分组信息
    /// </summary>
    public class ContactGroupInfo
    {
        /// <summary>
        /// 分组ID
        /// </summary>
        public string Id { get; set; }
        
        /// <summary>
        /// 分组名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 联系人数量
        /// </summary>
        public int ContactCount { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }

    /// <summary>
    /// 联系人操作结果
    /// </summary>
    public class ContactResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { get; set; }
        
        /// <summary>
        /// 请求ID
        /// </summary>
        public string RequestId { get; set; }
        
        /// <summary>
        /// 错误信息
        /// </summary>
        public string Error { get; set; }
    }

    /// <summary>
    /// 联系人分组操作结果
    /// </summary>
    public class ContactGroupResult
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 分组ID
        /// </summary>
        public string GroupId { get; set; }
        
        /// <summary>
        /// 分组名称
        /// </summary>
        public string GroupName { get; set; }
        
        /// <summary>
        /// 联系人ID
        /// </summary>
        public string ContactId { get; set; }
        
        /// <summary>
        /// 错误信息
        /// </summary>
        public string Error { get; set; }
    }

    /// <summary>
    /// 好友请求通知
    /// </summary>
    public class FriendRequestNotification
    {
        /// <summary>
        /// 通知类型
        /// </summary>
        public string Type { get; set; }
        
        /// <summary>
        /// 请求ID
        /// </summary>
        public string RequestId { get; set; }
        
        /// <summary>
        /// 用户ID
        /// </summary>
        public string UserId { get; set; }
        
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string Nickname { get; set; }
        
        /// <summary>
        /// 请求消息
        /// </summary>
        public string Message { get; set; }
        
        /// <summary>
        /// 时间戳
        /// </summary>
        public long Timestamp { get; set; }
    }

    #endregion

    #region 表情包相关模型

    /// <summary>
    /// 表情包
    /// </summary>
    public class Emoji
    {
        /// <summary>
        /// 表情包ID
        /// </summary>
        public string Id { get; set; }
        
        /// <summary>
        /// 表情包名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 表情包URL
        /// </summary>
        public string Url { get; set; }
        
        /// <summary>
        /// 缩略图URL
        /// </summary>
        public string ThumbnailUrl { get; set; }
        
        /// <summary>
        /// 表情包类型
        /// </summary>
        public EmojiType Type { get; set; }
        
        /// <summary>
        /// 分类ID
        /// </summary>
        public string CategoryId { get; set; }
        
        /// <summary>
        /// 创建者ID（自定义表情包）
        /// </summary>
        public string CreatorId { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }

    /// <summary>
    /// 表情包类型
    /// </summary>
    public enum EmojiType
    {
        /// <summary>
        /// 系统表情包
        /// </summary>
        System,
        
        /// <summary>
        /// 自定义表情包
        /// </summary>
        Custom
    }

    /// <summary>
    /// 表情包分类
    /// </summary>
    public class EmojiCategory
    {
        /// <summary>
        /// 分类ID
        /// </summary>
        public string Id { get; set; }
        
        /// <summary>
        /// 分类名称
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 分类图标URL
        /// </summary>
        public string IconUrl { get; set; }
        
        /// <summary>
        /// 排序权重
        /// </summary>
        public int SortWeight { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }

    /// <summary>
    /// 表情包消息内容
    /// </summary>
    public class EmojiMessageContent
    {
        /// <summary>
        /// 表情包ID
        /// </summary>
        public string EmojiId { get; set; }
        
        /// <summary>
        /// 表情包URL
        /// </summary>
        public string EmojiUrl { get; set; }
        
        /// <summary>
        /// 表情包名称
        /// </summary>
        public string EmojiName { get; set; }
        
        /// <summary>
        /// 是否是自定义表情包
        /// </summary>
        public bool IsCustom { get; set; }
    }

    #endregion
}